package ar.uade.fain.ai.tpo.dao;

import java.sql.PreparedStatement;
import java.sql.SQLException;

public interface ParameterSetter {
	
	public final static ParameterSetter VACIO = new ParameterSetter() {
		@Override
		public void setParametros(PreparedStatement statement) throws SQLException {
		}
	};
	
	public final static class Factory {
		
		public static ParameterSetter idOnly(final Long id) {
			return new ParameterSetter() {
				@Override
				public void setParametros(PreparedStatement statement)
						throws SQLException {
					statement.setLong(1, id);
				}
			};
		}
		
	} 
	
	void setParametros(PreparedStatement statement) throws SQLException ;
	
}
